package editvois

import (
	"fmt"
	"net/http"
)

// build a view for errors when all else fails.
func errorOut(w http.ResponseWriter, err error) {
	errorOutString(w, err.Error())
}

// build a view for errors when all else fails.
func errorOutString(w http.ResponseWriter, message string) {
	fmt.Fprint(w, "<html><head><title>Error</title></head>")
	fmt.Fprintf(w, "<body><h1>Error</h1><p>%s</p></body></html>", message)
}
